#ifndef CRECIPEINGREDIENT_H
#define CRECIPEINGREDIENT_H

#include <QObject>
#include "cobject.h"

class CRecipeIngredient : public CObject
{
    Q_OBJECT
//    Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(int ingredientId READ ingredientId WRITE setIngredientId NOTIFY ingredientIdChanged)
    Q_PROPERTY(int recipeId READ recipeId WRITE setRecipeId NOTIFY recipeIdChanged)
    Q_PROPERTY(double quantity READ quantity WRITE setQuantity NOTIFY quantityChanged)
    Q_PROPERTY(int unitTypeId READ unitTypeId WRITE setUnitTypeId NOTIFY unitTypeIdChanged)
public:
    explicit CRecipeIngredient(QObject *parent = 0);
//    CRecipeIngredient(const CRecipeIngredient& other);
//    int id();
//    void setId(int id);

    int ingredientId();
    void setIngredientId(int ingredientId);

    int recipeId();
    void setRecipeId(int recipeId);

    double quantity();
    void setQuantity(double quantity);

    int unitTypeId();
    void setUnitTypeId(int unitTypeId);

signals:
//    void idChanged();
    void ingredientIdChanged();
    void recipeIdChanged();
    void quantityChanged();
    void unitTypeIdChanged();

public slots:
private:
//    int m_id;
    int m_ingredient_id;
    int m_recipe_id;
    double m_quantity;
    int m_unit_type_id;
};

#endif // CRECIPEINGREDIENT_H
